
cd " "	

use ceps_sample, clear

// Table A1
summ Q1 Q2 Q3 Q4 ybirth std_cog std_mat std_chn std_eng yedu_f yedu_m if male==1
summ Q1 Q2 Q3 Q4 ybirth std_cog std_mat std_chn std_eng yedu_f yedu_m if male==0

summ  edu_exp2 kewaiban health_insur hrs_child pr_strict_total pr_taolun if male==1
summ  edu_exp2 kewaiban health_insur hrs_child pr_strict_total pr_taolun if male==0

// Table A6
set more off
foreach y of varlist std_cog std_mat std_chn std_eng {

	reghdfe `y' Q2 Q3 Q4 han rural yedu_f yedu_m  if male==0 , absorb(ctyids ybirth) cluster(ctyids_ybirth)
	reghdfe `y' Q2 Q3 Q4 han rural yedu_f yedu_m if male==1 , absorb(ctyids ybirth) cluster(ctyids_ybirth)

	quietly reg `y' Q2 Q3 Q4 han rural yedu_f yedu_m i.ybirth  if male==1 , absorb(ctyids)  
	est store `y'_1
	quietly reg `y' Q2 Q3 Q4 han rural yedu_f yedu_m i.ybirth  if male==0 , absorb(ctyids)  
	est store `y'_2
			
	quietly suest `y'_1 `y'_2,  vce(cluster ctyids_ybirth) 
	test ([`y'_1_mean]Q2 = [`y'_2_mean]Q2) ([`y'_1_mean]Q3 = [`y'_2_mean]Q3) ([`y'_1_mean]Q4 = [`y'_2_mean]Q4)
	
}


// Table A9
set more off
foreach y of varlist  std_edu_exp2 kewaiban health_insur std_hrs_child std_pr_strict_total std_pr_taolun  {

	reghdfe `y' Q2 Q3 Q4 han yedu_f yedu_m  if male==1 , absorb(ctyids ybirth clsids) cluster(ctyids_ybirth)
				test Q2 Q3 Q4
	reghdfe `y' Q2 Q3 Q4 han yedu_f yedu_m if male==0 , absorb(ctyids ybirth clsids) cluster(ctyids_ybirth)
				test Q2 Q3 Q4
}
